package 动态规划;
//https://leetcode.cn/problems/number-of-students-doing-homework-at-a-given-time/
public class 在既定时间做作业的学生人数 {
    public int busyStudent(int[] startTime, int[] endTime, int queryTime) {
        int result = 0;
        for (int i = 0 ; i < startTime.length ; i ++){
            if (endTime[i] - startTime[i] >= queryTime - startTime[i] && startTime[i] <= queryTime){
                result ++;
            }
        }
        return result;
    }
}
